package protocol

// PropHandler 道具使用处理
type PropHandler interface {
	// Use 道具使用
	Use(roleId uint64, item *ItemModel)
}

const (
	// ExpCard 经验卡
	ExpCard = 1
)

var propHandlerMap = make(map[uint32]PropHandler)

func initPropHandlerMap() {

}

func GetPropHandler(typeId uint32) PropHandler {
	handler, ok := propHandlerMap[typeId]
	if ok {
		return handler
	}
	return nil
}

func RegisterPropHandler(typeId uint32, handler PropHandler) {
	propHandlerMap[typeId] = handler
}
